function mpc = fubm_case_57_14_2MTDC_ctrls
%%%%%%%%%%%%%%%%%%%%%%%%%% IEEE_57_14_VSC  Test Case %%%%%%%%%%%%%%%%%%%%%%%%%%%

%% MATPOWER Case Format : Version 2
mpc.version = '2';

%%-----  Power Flow Data  -----%%
%% system MVA base
mpc.baseMVA = 100;

%% area data
% area refbus
mpc.areas = [
        1    101; %area 1 IEEE 57 Bus System
        2    201; %area 2 IEEE 14 Bus System
        3    1;   %DC area 1
        4    4;   %DC area 2
            ];

%% bus data
%	bus_i	type	Pd      Qd      Gs      Bs      area   Vm       Va    base  	zone	Vmax	Vmin

mpc.bus = [
    %Area 1 (IEEE 57 Bus System)
	101     3       55  	17  	0   	0   	1   	1       0       0   	1       1.06	0.94;
	102     2   	3   	88  	0   	0   	1   	1   	0       0   	1   	1.06	0.94;
	103   	2   	41  	21  	0   	0   	1   	1   	0   	0   	1   	1.06	0.94;
	104   	1   	0   	0   	0   	0   	1   	1   	0   	0   	1   	1.06	0.94;
	105   	1   	13  	4   	0   	0   	1   	1   	0   	0   	1   	1.06	0.94;
	106   	2   	75  	2   	0   	0   	1   	1   	0   	0   	1   	1.06	0.94;
	107   	1   	0   	0   	0   	0   	1   	1   	0   	0   	1   	1.06	0.94;
	108   	2   	150 	22  	0   	0   	1   	1   	0   	0   	1   	1.06	0.94;
	109   	2   	121 	26  	0   	0   	1   	1   	0   	0       1   	1.06	0.94;
	110  	1       5   	2   	0   	0   	1   	1   	0     	0   	1   	1.06	0.94;
	111  	1   	0   	0   	0   	0   	1   	1   	0   	0   	1   	1.06	0.94;
	112  	2   	377 	24  	0   	0   	1   	1   	0   	0   	1       1.06	0.94;
	113  	1   	18  	2.3 	0   	0   	1   	1   	0   	0   	1   	1.06	0.94;
	114  	1   	10.5 	5.3 	0   	0   	1   	1   	0   	0   	1   	1.06	0.94;
	115  	1   	22  	5   	0   	0   	1   	1   	0   	0   	1   	1.06	0.94;
	116  	1   	43  	3   	0   	0   	1   	1   	0   	0   	1   	1.06	0.94;
	117  	1   	42  	8   	0   	0   	1   	1   	0   	0   	1   	1.06	0.94;
	118  	1   	27.2    9.8 	0   	10  	1   	1   	0       0   	1   	1.06	0.94;
	119  	1   	3.3     0.6 	0   	0   	1   	1   	0   	0   	1   	1.06	0.94;
	120  	1   	2.3     1   	0   	0   	1   	1       0     	0   	1   	1.06	0.94;
	121  	1   	0   	0   	0   	0   	1   	1       0   	0   	1   	1.06	0.94;
	122  	1   	0   	0   	0   	0   	1   	1   	0       0   	1   	1.06	0.94;
	123  	1   	6.3 	2.1 	0   	0   	1   	1   	0     	0   	1   	1.06	0.94;
	124  	1   	0   	0   	0       0   	1   	1   	0   	0   	1   	1.06	0.94;
	125  	1   	6.3 	3.2 	0       5.9 	1   	1   	0   	0   	1   	1.06	0.94;
	126  	1       0   	0   	0   	0   	1   	1   	0   	0   	1   	1.06	0.94;
	127  	1   	9.3 	0.5 	0   	0   	1   	1   	0   	0   	1   	1.06	0.94;
	128  	1   	4.6 	2.3 	0   	0   	1   	1   	0    	0   	1   	1.06	0.94;
	129  	1   	17  	2.6 	0   	0       1   	1   	0   	0   	1   	1.06	0.94;
	130  	1   	3.6 	1.8 	0   	0   	1   	1   	0   	0   	1   	1.06	0.94;
	131  	1   	5.8 	2.9 	0   	0   	1   	1   	0   	0   	1   	1.06	0.94;
	132  	1   	1.6 	0.8 	0   	0       1   	1   	0   	0   	1   	1.06	0.94;
	133  	1   	3.8 	1.9 	0   	0   	1   	1       0   	0   	1   	1.06	0.94;
	134  	1   	0   	0   	0   	0   	1   	1   	0   	0   	1   	1.06	0.94;
	135  	1   	6   	3   	0   	0       1   	1   	0   	0   	1   	1.06	0.94;
	136  	1   	0   	0   	0   	0   	1   	1   	0   	0   	1   	1.06	0.94;
	137  	1   	0   	0   	0   	0   	1   	1   	0   	0   	1   	1.06	0.94;
	138  	1   	14  	7   	0   	0   	1   	1   	0   	0   	1   	1.06	0.94;
	139  	1   	0   	0   	0   	0   	1   	1   	0   	0   	1   	1.06	0.94;
	140  	1   	0   	0   	0   	0   	1   	1   	0   	0   	1   	1.06	0.94;
	141  	1   	6.3 	3   	0   	0   	1   	1   	0   	0   	1   	1.06	0.94;
	142  	1   	7.1 	4.4 	0   	0   	1   	1   	0   	0   	1   	1.06	0.94;
	143  	1   	2   	1   	0   	0   	1   	1   	0   	0   	1   	1.06	0.94;
	144     1   	12  	1.8 	0   	0   	1   	1   	0   	0   	1   	1.06	0.94;
	145  	1   	0   	0   	0   	0   	1       1   	0   	0   	1       1.06	0.94;
	146  	1   	0   	0   	0   	0   	1   	1   	0    	0   	1   	1.06	0.94;
	147  	1   	29.7    11.6	0   	0   	1   	1   	0   	0   	1   	1.06	0.94;
	148  	1   	0   	0   	0   	0   	1   	1   	0   	0   	1   	1.06	0.94;
	149  	1   	18  	8.5 	0   	0   	1   	1   	0   	0   	1   	1.06	0.94;
	150  	1   	21  	10.5	0   	0   	1   	1   	0   	0   	1   	1.06	0.94;
	151  	1   	18  	5.3 	0   	0   	1       1    	0   	0   	1   	1.06	0.94;
	152  	1   	4.9 	2.2 	0   	0   	1       1   	0   	0   	1   	1.06	0.94;
	153  	1   	20  	10  	0   	6.3 	1       1   	0   	0   	1   	1.06	0.94;
	154  	1   	4.1 	1.4     0   	0   	1       1   	0   	0   	1   	1.06	0.94;
	155  	1   	6.8 	3.4 	0   	0       1       1   	0   	0   	1   	1.06	0.94;
	156  	1   	7.6 	2.2 	0   	0   	1       1   	0   	0   	1   	1.06	0.94;
	157  	1   	6.7 	2   	0   	0   	1       1   	0   	0   	1   	1.06	0.94;
    %Area 2 (IEEE 14 Bus System)
    201   	2   	0   	0       0   	0   	2   	1       0       0   	1   	1.06	0.94;
	202   	2   	21.7    12.7	0   	0   	2   	1       0   	0   	1   	1.06	0.94;
	203   	2   	94.2    19  	0   	0   	2   	1   	0     	0   	1   	1.06	0.94;
	204   	1   	47.8    -3.9	0   	0   	2   	1   	0   	0   	1   	1.06	0.94;
	205   	1   	7.6 	1.6     0   	0   	2   	1   	0   	0   	1   	1.06	0.94;
	206   	2   	11.2	7.5 	0   	0   	2   	1   	0     	0   	1   	1.06	0.94;
	207   	1   	0   	0   	0   	0   	2   	1   	0   	0   	1   	1.06	0.94;
	208   	2   	0   	0   	0   	0   	2   	1   	0     	0   	1   	1.06	0.94;
	209   	1   	29.5  	16.6	0   	19  	2   	1   	0    	0   	1   	1.06	0.94;
	210  	1   	9   	5.8     0   	0   	2   	1   	0   	0   	1   	1.06	0.94;
	211  	1   	3.5     1.8     0   	0   	2   	1   	0     	0   	1   	1.06	0.94;
	212  	1   	6.1     1.6 	0   	0   	2   	1   	0    	0   	1   	1.06	0.94;
	213  	1   	13.5	5.8 	0   	0   	2   	1   	0    	0   	1   	1.06	0.94;
	214  	1   	14.9	5   	0   	0   	2   	1   	0     	0   	1   	1.06	0.94;
    %Area 3 (DC Area 1)
      1     1   	0	    0	    0       0.0     3   	1   	0     	100.0	1   	1.06	0.94; %DC A3
      2     1   	0	    0	    0       0.0     3   	1   	0     	100.0	1   	1.06	0.94; %DC A3
      3     1   	0	    0	    0       0.0     3   	1   	0      	100.0	1   	1.06	0.94; %DC A3
    %Area 4 (DC Area 2)  
      4     1   	0	    0	    0       0.0     4   	1   	0      	200.0	1   	1.06	0.94; %DC A4
      5     1   	0	    0	    0       0.0     4   	1   	0      	200.0	1   	1.06	0.94; %DC A4
      6     1   	0	    0	    0       0.0     4   	1   	0      	200.0	1   	1.06	0.94; %DC A4
      7     1   	0	    0	    0       0.0     4   	1   	0      	200.0	1   	1.06	0.94; %DC A4
      8     1   	0	    0	    0       0.0     4   	1   	0      	200.0	1   	1.06	0.94; %DC A4
      9     1   	-20	    0	    0       0.0     4   	1   	0      	200.0	1   	1.06	0.94; %DC A4
     10     1   	0	    0	    0       0.0     4   	1   	0      	200.0	1   	1.06	0.94; %DC A4
];
%% generator data
%	bus     Pg      Qg      Qmax	Qmin	Vg      mBase	status	Pmax	Pmin	Pc1	Pc2	Qc1min	Qc1max	Qc2min	Qc2max	ramp_agc	ramp_10	ramp_30	ramp_q	apf
mpc.gen = [
    %IEEE 57 Bus System
	101     128.9	-16.1	200 	-140	1.04	100     1   	575.88	0       0	0	0   	0   	0   	0   	0           0   	0       0   	0;
	102     0   	-0.8	50  	-17 	1.01	100 	1   	100 	0   	0	0	0   	0   	0   	0   	0           0   	0   	0   	0;
	103     40  	-1      60  	-10 	0.985	100 	1   	140 	0   	0	0	0   	0   	0   	0   	0           0   	0   	0   	0;
	106     0   	0.8 	25  	-8  	0.98	100 	1   	100 	0   	0	0	0   	0   	0   	0   	0        	0   	0   	0   	0;
	108     450 	62.1	200 	-140	1.005	100 	1   	550 	0   	0	0	0   	0   	0   	0   	0       	0   	0   	0      	0;
	109     0   	2.2     9   	-3  	0.98	100 	1   	100 	0   	0	0	0   	0   	0   	0   	0       	0   	0   	0   	0;
	112     310 	128.5	155 	-150	1.015	100 	1   	410 	0   	0	0	0   	0   	0   	0   	0       	0   	0   	0   	0;
    %IEEE 14 Bus System
    201   	232.4	-16.9	10  	0       1.06	100 	1   	332.4	0   	0	0	0   	0   	0   	0   	0       	0       0   	0   	0;
	202   	40  	42.4	50  	-40 	1.045	100 	1   	140 	0   	0	0	0   	0   	0   	0   	0       	0       0   	0   	0;
	203   	0   	23.4	40  	0       1.01	100 	1   	100 	0   	0	0	0   	0   	0   	0   	0       	0   	0   	0   	0;
	206   	0   	12.2	24  	-6  	1.07	100 	1   	100 	0   	0	0	0   	0   	0   	0   	0       	0   	0   	0   	0;
	208   	0   	17.4	24  	-6      1.09	100 	1   	100 	0   	0	0	0   	0   	0   	0   	0       	0   	0   	0   	0;
    %PV Generator is added as a load in bus 9
    ];
%% branch data
%  fbus tbus	r	    x	    b           rateA   rateB	rateC ratio/ma  angle status angmin	angmax  PF      QF      PT      QT      MU_SF  MU_ST   MU_ANGMIN   MU_ANGMAX   VF_SET  VT_SET  MA_MAX MA_MIN CONV_A     BEQ     K2   BEQ_MIN BEQ_MAX SH_MIN  SH_MAX  GSW ALPHA1 ALPHA2 ALPHA3   KDP  ----------------------
mpc.branch = [
%Area 1  IEEE 57 Bus System  
	101	102   	0.0083	0.028	0.129       000     0       0       0       0   	1   -360	360     0       0       0       0       0       0       0           0           0       0      0       0        0       0       1    0       0       -360    360     0    0       0       0     0;
	102	103   	0.0298	0.085	0.0818      000     0   	0   	0   	0   	1   -360	360     0       0       0       0       0       0       0           0           0       0      0       0        0       0       1    0       0       -360    360     0    0       0       0     0;
	103	104   	0.0112	0.0366	0.038       000   	0   	0   	0   	0   	1   -360	360     0       0       0       0       0       0       0           0           0       0      0       0        0       0       1    0       0       -360    360     0    0       0       0     0;
	104	105   	0.0625	0.132	0.0258  	000   	0   	0      	0   	0    	1	-360	360     0       0       0       0       0       0       0           0           0       0      0       0        0       0       1    0       0       -360    360     0    0       0       0     0;
	104	106   	0.043	0.148	0.0348  	000   	0   	0   	0   	0   	1	-360	360     0       0       0       0       0       0       0           0           0       0      0       0        0       0       1    0       0       -360    360     0    0       0       0     0;
	106	107   	0.02	0.102	0.0276  	000   	0   	0   	0   	0    	1	-360	360     0       0       0       0       0       0       0           0           0       0      0       0        0       0       1    0       0       -360    360     0    0       0       0     0;
	106	108   	0.0339	0.173	0.047   	000   	0   	0   	0   	0   	1	-360	360     0       0       0       0       0       0       0           0           0       0      0       0        0       0       1    0       0       -360    360     0    0       0       0     0;
	108	109   	0.0099	0.0505	0.0548  	000   	0   	0   	0   	0   	1	-360	360     0       0       0       0       0       0       0           0           0       0      0       0        0       0       1    0       0       -360    360     0    0       0       0     0;
	109	110  	0.0369	0.1679	0.044   	000   	0   	0   	0    	0   	1	-360	360     0       0       0       0       0       0       0           0           0       0      0       0        0       0       1    0       0       -360    360     0    0       0       0     0;
	109	111  	0.0258	0.0848	0.0218  	000   	0   	0   	0   	0   	1	-360	360     0       0       0       0       0       0       0           0           0       0      0       0        0       0       1    0       0       -360    360     0    0       0       0     0;
	109	112  	0.0648	0.295	0.0772  	000   	0   	0   	0   	0   	1	-360	360     0       0       0       0       0       0       0           0           0       0      0       0        0       0       1    0       0       -360    360     0    0       0       0     0;
	109	113  	0.0481	0.158	0.0406  	000   	0   	0   	0   	0    	1	-360	360     0       0       0       0       0       0       0           0           0       0      0       0        0       0       1    0       0       -360    360     0    0       0       0     0;
	113	114  	0.0132	0.0434	0.011   	000   	0   	0   	0   	0   	1	-360	360     0       0       0       0       0       0       0           0           0       0      0       0        0       0       1    0       0       -360    360     0    0       0       0     0;
	113	115  	0.0269	0.0869	0.023   	000   	0   	0   	0   	0   	1	-360	360     0       0       0       0       0       0       0           0           0       0      0       0        0       0       1    0       0       -360    360     0    0       0       0     0;
	101	115  	0.0178	0.091	0.0988  	000   	0   	0   	0   	0   	1	-360	360     0       0       0       0       0       0       0           0           0       0      0       0        0       0       1    0       0       -360    360     0    0       0       0     0;
	101	116  	0.0454	0.206	0.0546  	000   	0   	0   	0   	0   	1	-360	360     0       0       0       0       0       0       0           0           0       0      0       0        0       0       1    0       0       -360    360     0    0       0       0     0;
	101	117  	0.0238	0.108	0.0286  	000   	0   	0   	0   	0   	1	-360	360     0       0       0       0       0       0       0           0           0       0      0       0        0       0       1    0       0       -360    360     0    0       0       0     0;
	103	115  	0.0162	0.053	0.0544  	000   	0   	0   	0   	0   	1	-360	360     0       0       0       0       0       0       0           0           0       0      0       0        0       0       1    0       0       -360    360     0    0       0       0     0;
	104	118  	0       0.555	0       	000   	0   	0   	0.97	0   	1	-360	360     0       0       0       0       0       0       0           0           0       0      0       0        0       0       1    0       0       -360    360     0    0       0       0     0;
	104	118  	0       0.43	0       	000   	0   	0   	0.978	0   	1	-360	360     0       0       0       0       0       0       0           0           0       0      0       0        0       0       1    0       0       -360    360     0    0       0       0     0;
	105	106   	0.0302	0.0641	0.0124      000   	0   	0   	0   	0   	1	-360	360     0       0       0       0       0       0       0           0           0       0      0       0        0       0       1    0       0       -360    360     0    0       0       0     0;
	107	108   	0.0139	0.0712	0.0194  	000   	0   	0   	0   	0   	1	-360	360     0       0       0       0       0       0       0           0           0       0      0       0        0       0       1    0       0       -360    360     0    0       0       0     0;
	110	112  	0.0277	0.1262	0.0328  	000   	0   	0   	0   	0   	1	-360	360     0       0       0       0       0       0       0           0           0       0      0       0        0       0       1    0       0       -360    360     0    0       0       0     0;
	111	113  	0.0223	0.0732	0.0188  	000   	0   	0   	0   	0   	1	-360	360     0       0       0       0       0       0       0           0           0       0      0       0        0       0       1    0       0       -360    360     0    0       0       0     0;
	112	113  	0.0178	0.058	0.0604  	000   	0   	0      	0   	0   	1	-360	360     0       0       0       0       0       0       0           0           0       0      0       0        0       0       1    0       0       -360    360     0    0       0       0     0;
	112	116  	0.018	0.0813	0.0216  	000   	0   	0   	0   	0   	1	-360	360     0       0       0       0       0       0       0           0           0       0      0       0        0       0       1    0       0       -360    360     0    0       0       0     0;
	112	117  	0.0397	0.179	0.0476  	000   	0   	0   	0   	0   	1	-360	360     0       0       0       0       0       0       0           0           0       0      0       0        0       0       1    0       0       -360    360     0    0       0       0     0;
	114	115  	0.0171	0.0547	0.0148  	000   	0       0   	0   	0   	1	-360	360     0       0       0       0       0       0       0           0           0       0      0       0        0       0       1    0       0       -360    360     0    0       0       0     0;
	118	119  	0.461	0.685	0       	000   	0   	0   	0   	0   	1	-360	360     0       0       0       0       0       0       0           0           0       0      0       0        0       0       1    0       0       -360    360     0    0       0       0     0;
	119	120  	0.283	0.434	0       	000   	0   	0   	0    	0   	1	-360	360     0       0       0       0       0       0       0           0           0       0      0       0        0       0       1    0       0       -360    360     0    0       0       0     0;
	121	120  	0   	0.7767	0       	000   	0   	0       1.043   0   	1	-360	360     0       0       0       0       0       0       0           0           0       0      0       0        0       0       1    0       0       -360    360     0    0       0       0     0;
	121	122  	0.0736	0.117	0           000   	0   	0   	0   	0   	1	-360	360     0       0       0       0       0       0       0           0           0       0      0       0        0       0       1    0       0       -360    360     0    0       0       0     0;
	122	123  	0.0099	0.0152	0           000   	0   	0   	0   	0   	1	-360	360     0       0       0       0       0       0       0           0           0       0      0       0        0       0       1    0       0       -360    360     0    0       0       0     0;
	123	124  	0.166	0.256	0.0084  	000   	0   	0   	0   	0   	1	-360	360     0       0       0       0       0       0       0           0           0       0      0       0        0       0       1    0       0       -360    360     0    0       0       0     0;
	124	125  	0   	1.182	0           000   	0   	0   	1   	0   	1	-360	360     0       0       0       0       0       0       0           0           0       0      0       0        0       0       1    0       0       -360    360     0    0       0       0     0;
	124	125  	0       1.23	0       	000   	0   	0   	1   	0    	1	-360	360     0       0       0       0       0       0       0           0           0       0      0       0        0       0       1    0       0       -360    360     0    0       0       0     0;
	124	126  	0   	0.0473	0       	000   	0   	0   	1.043	0   	1	-360	360     0       0       0       0       0       0       0           0           0       0      0       0        0       0       1    0       0       -360    360     0    0       0       0     0;
	126	127  	0.165	0.254	0       	000   	0   	0   	0   	0   	1	-360	360     0       0       0       0       0       0       0           0           0       0      0       0        0       0       1    0       0       -360    360     0    0       0       0     0;
	127	128  	0.0618	0.0954	0       	000   	0   	0     	0   	0   	1	-360	360     0       0       0       0       0       0       0           0           0       0      0       0        0       0       1    0       0       -360    360     0    0       0       0     0;
	128	129  	0.0418	0.0587	0       	000   	0   	0   	0   	0   	1	-360	360     0       0       0       0       0       0       0           0           0       0      0       0        0       0       1    0       0       -360    360     0    0       0       0     0;
	107	129  	0   	0.0648	0       	000   	0   	0   	0.967	0    	1	-360	360     0       0       0       0       0       0       0           0           0       0      0       0        0       0       1    0       0       -360    360     0    0       0       0     0;
	125	130  	0.135	0.202	0       	000   	0   	0   	0   	0   	1	-360	360     0       0       0       0       0       0       0           0           0       0      0       0        0       0       1    0       0       -360    360     0    0       0       0     0;
	130	131  	0.326	0.497	0       	000   	0   	0   	0   	0   	1	-360	360     0       0       0       0       0       0       0           0           0       0      0       0        0       0       1    0       0       -360    360     0    0       0       0     0;
	131	132  	0.507	0.755	0       	000   	0   	0   	0   	0   	1	-360	360     0       0       0       0       0       0       0           0           0       0      0       0        0       0       1    0       0       -360    360     0    0       0       0     0;
	132	133      0.0392	0.036	0       	000   	0   	0   	0   	0   	1	-360	360     0       0       0       0       0       0       0           0           0       0      0       0        0       0       1    0       0       -360    360     0    0       0       0     0;
	134	132  	0   	0.953	0           000   	0   	0   	0.975	0   	1	-360	360     0       0       0       0       0       0       0           0           0       0      0       0        0       0       1    0       0       -360    360     0    0       0       0     0;
	134	135  	0.052	0.078	0.0032  	000   	0   	0   	0   	0   	1	-360	360     0       0       0       0       0       0       0           0           0       0      0       0        0       0       1    0       0       -360    360     0    0       0       0     0;
	135	136  	0.043	0.0537	0.0016  	000   	0   	0   	0   	0   	1	-360	360     0       0       0       0       0       0       0           0           0       0      0       0        0       0       1    0       0       -360    360     0    0       0       0     0;
	136	137  	0.029	0.0366	0           000   	0   	0   	0   	0    	1	-360	360     0       0       0       0       0       0       0           0           0       0      0       0        0       0       1    0       0       -360    360     0    0       0       0     0;
	137	138  	0.0651	0.1009	0.002   	000   	0   	0      	0   	0   	1	-360	360     0       0       0       0       0       0       0           0           0       0      0       0        0       0       1    0       0       -360    360     0    0       0       0     0;
	137	139  	0.0239	0.0379	0           000   	0   	0   	0   	0   	1	-360	360     0       0       0       0       0       0       0           0           0       0      0       0        0       0       1    0       0       -360    360     0    0       0       0     0;
	136	140  	0.03	0.0466	0           000   	0   	0   	0   	0   	1	-360	360     0       0       0       0       0       0       0           0           0       0      0       0        0       0       1    0       0       -360    360     0    0       0       0     0;
	122	138  	0.0192	0.0295	0           000   	0   	0   	0   	0   	1	-360	360     0       0       0       0       0       0       0           0           0       0      0       0        0       0       1    0       0       -360    360     0    0       0       0     0;
	111	141  	0   	0.749	0           000   	0   	0       0.955	0   	1	-360	360     0       0       0       0       0       0       0           0           0       0      0       0        0       0       1    0       0       -360    360     0    0       0       0     0;
	141	142  	0.207	0.352	0           000   	0   	0   	0   	0   	1	-360	360     0       0       0       0       0       0       0           0           0       0      0       0        0       0       1    0       0       -360    360     0    0       0       0     0;
	141	143  	0       0.412	0           000   	0   	0   	0   	0   	1	-360	360     0       0       0       0       0       0       0           0           0       0      0       0        0       0       1    0       0       -360    360     0    0       0       0     0;
	138	144  	0.0289	0.0585	0.002   	000   	0   	0       0   	0   	1	-360	360     0       0       0       0       0       0       0           0           0       0      0       0        0       0       1    0       0       -360    360     0    0       0       0     0;
	115	145  	0   	0.1042	0           000   	0       0   	0.955	0   	1	-360	360     0       0       0       0       0       0       0           0           0       0      0       0        0       0       1    0       0       -360    360     0    0       0       0     0;
	114	146  	0       0.0735	0           000   	0   	0   	0.9 	0   	1	-360	360     0       0       0       0       0       0       0           0           0       0      0       0        0       0       1    0       0       -360    360     0    0       0       0     0;
	146	147  	0.023	0.068	0.0032  	000   	0   	0   	0   	0   	1	-360	360     0       0       0       0       0       0       0           0           0       0      0       0        0       0       1    0       0       -360    360     0    0       0       0     0;
	147	148  	0.0182	0.0233	0           000   	0   	0   	0   	0      	1	-360	360     0       0       0       0       0       0       0           0           0       0      0       0        0       0       1    0       0       -360    360     0    0       0       0     0;
	148	149  	0.0834	0.129	0.0048  	000   	0   	0   	0   	0   	1	-360	360     0       0       0       0       0       0       0           0           0       0      0       0        0       0       1    0       0       -360    360     0    0       0       0     0;
	149	150  	0.0801	0.128	0           000   	0   	0   	0   	0   	1	-360	360     0       0       0       0       0       0       0           0           0       0      0       0        0       0       1    0       0       -360    360     0    0       0       0     0;
	150	151  	0.1386	0.22	0           000   	0   	0   	0   	0   	1	-360	360     0       0       0       0       0       0       0           0           0       0      0       0        0       0       1    0       0       -360    360     0    0       0       0     0;
	110	151  	0   	0.0712	0           000   	0   	0   	0.93	0   	1	-360	360     0       0       0       0       0       0       0           0           0       0      0       0        0       0       1    0       0       -360    360     0    0       0       0     0;
	113	149  	0   	0.191	0           000   	0   	0    	0.895	0   	1	-360	360     0       0       0       0       0       0       0           0           0       0      0       0        0       0       1    0       0       -360    360     0    0       0       0     0;
	129	152  	0.1442	0.187	0           000   	0       0   	0   	0   	1	-360	360     0       0       0       0       0       0       0           0           0       0      0       0        0       0       1    0       0       -360    360     0    0       0       0     0;
	152	153  	0.0762	0.0984	0           000   	0   	0   	0   	0   	1	-360	360     0       0       0       0       0       0       0           0           0       0      0       0        0       0       1    0       0       -360    360     0    0       0       0     0;
	153	154  	0.1878	0.232	0           000   	0   	0   	0   	0   	1	-360	360     0       0       0       0       0       0       0           0           0       0      0       0        0       0       1    0       0       -360    360     0    0       0       0     0;
	154	155  	0.1732	0.2265	0           000   	0   	0   	0   	0   	1	-360	360     0       0       0       0       0       0       0           0           0       0      0       0        0       0       1    0       0       -360    360     0    0       0       0     0;
	111	143  	0   	0.153	0           000   	0   	0   	0.958	0   	1	-360	360     0       0       0       0       0       0       0           0           0       0      0       0        0       0       1    0       0       -360    360     0    0       0       0     0;
	144	145  	0.0624	0.1242	0.004       000   	0   	0   	0   	0   	1	-360	360     0       0       0       0       0       0       0           0           0       0      0       0        0       0       1    0       0       -360    360     0    0       0       0     0;
	140	156  	0   	1.195	0           000   	0   	0   	0.958	0   	1	-360	360     0       0       0       0       0       0       0           0           0       0      0       0        0       0       1    0       0       -360    360     0    0       0       0     0;
	156	141  	0.553	0.549	0           000   	0   	0   	0   	0   	1	-360	360     0       0       0       0       0       0       0           0           0       0      0       0        0       0       1    0       0       -360    360     0    0       0       0     0;
	156	142  	0.2125	0.354	0       	000   	0   	0   	0   	0   	1	-360	360     0       0       0       0       0       0       0           0           0       0      0       0        0       0       1    0       0       -360    360     0    0       0       0     0;
	139	157  	0   	1.355	0       	000   	0   	0   	0.98	0   	1	-360	360     0       0       0       0       0       0       0           0           0       0      0       0        0       0       1    0       0       -360    360     0    0       0       0     0;
	157	156  	0.174	0.26	0       	000   	0   	0   	0   	0   	1	-360	360     0       0       0       0       0       0       0           0           0       0      0       0        0       0       1    0       0       -360    360     0    0       0       0     0;
	138	149  	0.115	0.177	0.003   	000   	0   	0   	0   	0   	1	-360	360     0       0       0       0       0       0       0           0           0       0      0       0        0       0       1    0       0       -360    360     0    0       0       0     0;
	138	148  	0.0312	0.0482	0       	000   	0   	0   	0   	0    	1	-360	360     0       0       0       0       0       0       0           0           0       0      0       0        0       0       1    0       0       -360    360     0    0       0       0     0;
	109	155  	0   	0.1205	0       	000   	0   	0   	0.94	0   	1	-360	360     0       0       0       0       0       0       0           0           0       0      0       0        0       0       1    0       0       -360    360     0    0       0       0     0;
%Area 2  IEEE 14 Bus System                 rateA   rateB	rateC ratio/ma  angle status angmin	angmax  PF      QF      PT      QT      MU_SF  MU_ST   MU_ANGMIN   MU_ANGMAX   VF_SET  VT_SET  MA_MAX MA_MIN CONV_A     BEQ     K2   BEQ_MIN BEQ_MAX SH_MIN  SH_MAX  GSW ALPHA1 ALPHA2 ALPHA3
    201	202     0.01938	0.05917	0.0528  	000     0   	0   	0   	0   	1	-360	360     0       0       0       0       0       0       0           0           0       0      0       0        0       0       1    0       0       -360    360     0    0       0       0     0;
	201	205   	0.05403	0.22304	0.0492      000   	0   	0   	0   	0   	1	-360	360     0       0       0       0       0       0       0           0           0       0      0       0        0       0       1    0       0       -360    360     0    0       0       0     0;
	202	203   	0.04699	0.19797	0.0438      000   	0   	0   	0   	0   	1	-360	360     0       0       0       0       0       0       0           0           0       0      0       0        0       0       1    0       0       -360    360     0    0       0       0     0;
	202	204   	0.05811	0.17632	0.034       000   	0   	0   	0   	0   	1	-360	360     0       0       0       0       0       0       0           0           0       0      0       0        0       0       1    0       0       -360    360     0    0       0       0     0;
	202	205   	0.05695	0.17388	0.0346  	000   	0   	0   	0   	0    	1	-360	360     0       0       0       0       0       0       0           0           0       0      0       0        0       0       1    0       0       -360    360     0    0       0       0     0;
	203	204   	0.06701	0.17103	0.0128  	000   	0   	0   	0   	0   	1	-360	360     0       0       0       0       0       0       0           0           0       0      0       0        0       0       1    0       0       -360    360     0    0       0       0     0;
	204	205   	0.01335	0.04211	0       	000   	0   	0   	0   	0   	1	-360	360     0       0       0       0       0       0       0           0           0       0      0       0        0       0       1    0       0       -360    360     0    0       0       0     0;
	204	207   	0       0.20912	0           000   	0   	0   	0.978	0   	1	-360	360     0       0       0       0       0       0       0           0           0       0      0       0        0       0       1    0       0       -360    360     0    0       0       0     0;
	204	209   	0   	0.55618	0       	000   	0   	0   	0.969	0   	1	-360	360     0       0       0       0       0       0       0           0           0       0      0       0        0       0       1    0       0       -360    360     0    0       0       0     0;
	205	206   	0   	0.25202	0       	000   	0   	0   	0.932	0   	1	-360	360     0       0       0       0       0       0       0           0           0       0      0       0        0       0       1    0       0       -360    360     0    0       0       0     0;
	206	211  	0.09498	0.1989	0       	000   	0   	0   	0       0   	1	-360	360     0       0       0       0       0       0       0           0           0       0      0       0        0       0       1    0       0       -360    360     0    0       0       0     0;
	206	212  	0.12291	0.25581	0       	000   	0   	0   	0       0   	1	-360	360     0       0       0       0       0       0       0           0           0       0      0       0        0       0       1    0       0       -360    360     0    0       0       0     0;
	206	213  	0.06615	0.13027	0          	000   	0   	0    	0   	0   	1	-360	360     0       0       0       0       0       0       0           0           0       0      0       0        0       0       1    0       0       -360    360     0    0       0       0     0;
	207	208   	0   	0.17615	0       	000   	0   	0   	0   	0   	1	-360	360     0       0       0       0       0       0       0           0           0       0      0       0        0       0       1    0       0       -360    360     0    0       0       0     0;
	207	209   	0   	0.11001	0       	000   	0   	0   	0   	0   	1	-360	360     0       0       0       0       0       0       0           0           0       0      0       0        0       0       1    0       0       -360    360     0    0       0       0     0;
	209	210  	0.03181	0.0845	0       	000   	0   	0   	0   	0   	1	-360	360     0       0       0       0       0       0       0           0           0       0      0       0        0       0       1    0       0       -360    360     0    0       0       0     0;
	209	214  	0.12711	0.27038	0       	000   	0   	0   	0   	0   	1	-360	360     0       0       0       0       0       0       0           0           0       0      0       0        0       0       1    0       0       -360    360     0    0       0       0     0;
	210	211  	0.08205	0.19207	0       	000   	0   	0   	0   	0   	1	-360	360     0       0       0       0       0       0       0           0           0       0      0       0        0       0       1    0       0       -360    360     0    0       0       0     0;
	212	213  	0.22092	0.19988	0       	000   	0   	0   	0   	0   	1	-360	360     0       0       0       0       0       0       0           0           0       0      0       0        0       0       1    0       0       -360    360     0    0       0       0     0;
	213	214  	0.17093	0.34802	0       	000   	0   	0   	0   	0   	1	-360	360     0       0       0       0       0       0       0           0           0       0      0       0        0       0       1    0       0       -360    360     0    0       0       0     0;
%Area 3  (DC Area 1)                        rateA   rateB	rateC ratio/ma  angle status angmin	angmax  PF      QF      PT      QT      MU_SF  MU_ST   MU_ANGMIN   MU_ANGMAX   VF_SET  VT_SET  MA_MAX MA_MIN CONV_A     bEQ     K2   BEQ_MIN BEQ_MAX SH_MIN  SH_MAX  GSW ALPHA1 ALPHA2 ALPHA3
    % DC Grid
      1   2     0.010	0    	0       	000 	500 	500 	0.0 	0.0 	1	-360	360     0       0       0       0       0       0       0           0           0       0      0       0        0       0       1    0       0       -360    360     0    0       0       0     0;
      2   3     0.010	0    	0       	000 	500 	500 	0.0 	0.0 	1	-360	360     0       0       0       0       0       0       0           0           0       0      0       0        0       0       1    0       0       -360    360     0    0       0       0     0;
      3   1     0.020	0    	0       	000 	500 	500 	0.0 	0.0 	1	-360	360     0       0       0       0       0       0       0           0           0       0      0       0        0       0       1    0       0       -360    360     0    0       0       0     0;
    % DC Converters                         rateA   rateB	rateC ratio/ma  angle status angmin	angmax  PF      QF      PT      QT      MU_SF  MU_ST   MU_ANGMIN   MU_ANGMAX   VF_SET  VT_SET  MA_MAX MA_MIN CONV_A     BEQ     K2   BEQ_MIN BEQ_MAX SH_MIN  SH_MAX  GSW ALPHA1 ALPHA2 ALPHA3
      1  212    0.0510  0.033   0    	    000 	500 	500 	1.0     0	    1	-360    360     0       0       0       0       0       0       0           0           1.05    0      0       0        2       0       1    -0.5    0.5     -360    360     0    0.0001  0.005    0.05 0;%Conv1
      2  150    0.0765	0.050   0           000 	500 	500 	1.0     0	    1	-360    360     0       0       0       0       0       0       0           0           0       0      0       0        1       0       1    -0.5    0.5     -360    360     0    0.0001  0.005    0.05 0;%Conv2
      3  151    0.0765	0.050   0           000 	500 	500 	1.0     0	    1	-360    360     0       0       0       0       0       0       0           0           0       0      0       0        1       0       1    -0.5    0.5     -360    360     0    0.0001  0.005    0.05 0;%Conv3
    % DC Transformers   
%Area 4  (DC Area 2)                        rateA   rateB	rateC ratio/ma  angle status angmin	angmax  PF      QF      PT      QT      MU_SF  MU_ST   MU_ANGMIN   MU_ANGMAX   VF_SET  VT_SET  MA_MAX MA_MIN CONV_A     BEQ     K2   BEQ_MIN BEQ_MAX SH_MIN  SH_MAX  GSW ALPHA1 ALPHA2 ALPHA3
    % DC Grid      
      4   9     0.010	0    	0       	000 	500 	500 	0.0 	0.0 	1	-360	360     0       0       0       0       0       0       0           0           0       0      0       0        0       0       1    0       0       -360    360     0    0       0       0     0;
      4   10    0.005	0    	0       	000 	500 	500 	0.0 	0.0 	1	-360	360     0       0       0       0       0       0       0           0           0       0      0       0        0       0       1    0       0       -360    360     0    0       0       0     0;
      5   6     0.015	0    	0       	000 	500 	500 	0.0 	0.0 	1	-360	360     0       0       0       0       0       0       0           0           0       0      0       0        0       0       1    0       0       -360    360     0    0       0       0     0;
      5   7     0.015	0    	0       	000 	500 	500 	0.0 	0.0 	1	-360	360     0       0       0       0       0       0       0           0           0       0      0       0        0       0       1    0       0       -360    360     0    0       0       0     0;
      6   10    0.010	0    	0       	000 	500 	500 	0.0 	0.0 	1	-360	360     0       0       0       0       0       0       0           0           0       0      0       0        0       0       1    0       0       -360    360     0    0       0       0     0;
      7   10    0.015	0    	0       	000 	500 	500 	0.0 	0.0 	1	-360	360     0       0       0       0       0       0       0           0           0       0      0       0        0       0       1    0       0       -360    360     0    0       0       0     0;
      8   9     0.015	0    	0       	000 	500 	500 	0.0 	0.0 	1	-360	360     0       0       0       0       0       0       0           0           0       0      0       0        0       0       1    0       0       -360    360     0    0       0       0     0;
    % DC Converters                         rateA   rateB	rateC ratio/ma  angle status angmin	angmax  PF      QF      PT      QT      MU_SF  MU_ST   MU_ANGMIN   MU_ANGMAX   VF_SET  VT_SET  MA_MAX MA_MIN CONV_A     BEQ     K2   BEQ_MIN BEQ_MAX SH_MIN  SH_MAX  GSW ALPHA1 ALPHA2 ALPHA3
      4  101    0.0510	0.033 	0       	000 	500 	500 	1.0     0	    1	-360    360     0       0       0       0       0       0       0           0           1.01    0      0       0        2       0       1    -0.5    0.5     -360    360     0    0.0001  0.005    0.05 0;%Conv4
      5  202    0.0765	0.050 	0       	000 	500 	500 	1.0     0	    1	-360    360     0       0       0       0       0       0       0           0           0       0      0       0        1       0       1    -0.5    0.5     -360    360     0    0.0001  0.005    0.05 0;%Conv5
      6  205    0.0765	0.050 	0       	000 	500 	500 	1.0     0	    1	-360    360     0       0       0       0       0       0       0           0           0       0      0       0        1       0       1    -0.5    0.5     -360    360     0    0.0001  0.005    0.05 0;%Conv6
      7  115    0.0765	0.050 	0       	000 	500 	500 	1.0     0	    1	-360    360     0       0       0       0       0       0       0           0           0       0      0       0        1       0       1    -0.5    0.5     -360    360     0    0.0001  0.005    0.05 0;%Conv7
      8  117    0.0765	0.050 	0       	000 	500 	500 	1.0     0	    1	-360    360     0       0       0       0       0       0       0           0           0       0      0       0        1       0       1    -0.5    0.5     -360    360     0    0.0001  0.005    0.05 0;%Conv8
    % DC Transformers   
    ];
%%-----  OPF Data  -----%%
%% generator cost data
%	1	startup	shutdown	n	x1	y1	...	xn	yn
%	2	startup	shutdown	n	c(n-1)	...	c0
mpc.gencost = [
    %Pg cost
	2	0   	0         	3	0.077579519 	20  	0;
	2	0   	0          	3	0.01        	40  	0;
	2	0   	0       	3	0.25        	20  	0;
	2	0   	0       	3	0.01        	40  	0;
	2	0   	0       	3	0.0222222222	20  	0;
	2	0   	0       	3	0.01        	40  	0;
	2	0   	0       	3	0.0322580645	20  	0;
    2	0       0           3	0.0430292599	20      0;
	2	0       0           3	0.25            20      0;
	2	0       0           3	0.01            40      0;
	2	0       0           3	0.01            40      0;
	2	0       0           3	0.01            40      0;
    %Qg cost
    2	0   	0         	3	0.000          	0     	0;
	2	0   	0          	3	0.000          	0     	0;
	2	0   	0       	3	0.000          	0     	0;
	2	0   	0       	3	0.000          	0     	0;
	2	0   	0       	3	0.000          	0     	0;
	2	0   	0       	3	0.000          	0     	0;
	2	0   	0       	3	0.000          	0     	0;
    2	0       0           3	0.000          	0     	0;
	2	0       0           3	0.000          	0     	0;
	2	0       0           3	0.000          	0     	0;
	2	0       0           3	0.000          	0     	0;
	2	0       0           3	0.000          	0     	0;
];
